package com.itheima.Mapper;

import com.itheima.Pojo.Department;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import java.util.List;
@Mapper
public interface DepartmentMapper {
    @Select("select * from department")
    public List<Department> SelectAll();

    @Delete("delete from department where code = #{code}")
    void deleteById(Integer code);


    void updateByICode(Department department);

    @Insert("insert into department (code,name) values (#{code},#{name})")
    void addDepartment(Department department);
}
